home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1115 / text0000.txt < prev   
Encoding:
Text File  |  1996-08-05  |  2.2 KB  |  49 lines

  1. In a message of 13 Jan 96, Mark wrote to All:
  2.  
  3.  MC> I have a few questions about programming HAM mode graphics.  Please
  4.  MC> answer if you know the answers.  I have started working on programming
  5.  MC> HAM stuff, but there still are some things I don't know about HAM.
  6.  MC> BTW, this is ECS (HAM6) HAM I'm asking about (not AGA).
  7.  
  8. Well, the only difference between HAM6 and HAM8 is the number of bits
  9. available for base selection and modify.
  10.  
  11.  MC> 1.  Is there are HAM (how-to/explanation/etc.) documents available on
  12.  MC> the net?
  13.  
  14. Not that I know of. HAM6 is documented in RKM Libraries at least.
  15.  
  16.  MC> 2.  How do you get rid of the left edge ham fringing (if that's what
  17.  MC> it's called) that occurs when you scroll the ham image to the left (so
  18.  MC> that the left part of the image is offscreen).  What I'm talking about
  19.  MC> is those long (varying length) lines (starting from left edge) of the
  20.  MC> wrong color that appear on certain scanlines.  I know there is a way to
  21.  MC> get rid of it, because GIF_view 4.4 (on aminet) has a PERFECT option
  22.  MC> that gets rid of it. Anyone know how that option is implemented (or how
  23.  MC> to get rid of this fringing)? The author refers to it as "left border
  24.  MC> color distortion".  I think I know why the color distortion occurs, and
  25.  MC> I figure writing a specific color to the first viewable pixel of each
  26.  MC> line would solve it, but I have no idea what color that should be.  Am
  27.  MC> I right about how it's done?  Any information you could give me on how
  28.  MC> it's done would be helpful...  Thanks...
  29.  
  30. What that program probably does is to recode each color, even if not
  31. needed.
  32.  
  33. As you probably now, HAM is based on a few base registers, and for each new
  34. pixel, either a base register can be used, or one component of the previous
  35. color can be changed.
  36.  
  37. Now, if you have a large area (or line) that consists of a color not in a
  38. base register, the normal thing to do is to first take the best base
  39. register, modify it to the requested color, and then leave it at that (i.e.
  40. previous pixel is right, so don't change any component).
  41.  
  42. However, if you instead "recode" the color for each pixel (one component at
  43. a time, ofcourse), the fringing is kept to a minimum. jpegAGA uses this
  44. approach.
  45.  
  46. --
  47. Magnus Holmgren - Amiga programmer and enthusiast
  48.  
  49.